﻿<UserControl x:Class="CommonLibrary.WaitCursor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Viewbox>
        <Canvas Width="80" Height="80" Name="canvas">
            <Canvas.RenderTransform>
                <RotateTransform Angle="0" CenterX="40" CenterY="40" />
            </Canvas.RenderTransform>
            <Canvas.Triggers>

                <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="canvas"
                      Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
                      To="360"
                      Duration="0:0:0.7"
                      RepeatBehavior="Forever"/>
                            </Storyboard>

                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Canvas.Triggers>
            <Ellipse Canvas.Top="0" Canvas.Left="30" Width="20" Height="20" Fill="#08000000"/>
            <Ellipse Canvas.Top="10" Canvas.Left="50" Width="20" Height="20" Fill="#15000000"/>

            <Ellipse Canvas.Top="30" Canvas.Left="60" Width="20" Height="20" Fill="#38000000"/>
            <Ellipse Canvas.Top="50" Canvas.Left="50" Width="20" Height="20" Fill="#55000000"/>
            <Ellipse Canvas.Top="60" Canvas.Left="30" Width="20" Height="20" Fill="#88000000"/>
            <Ellipse Canvas.Top="50" Canvas.Left="10" Width="20" Height="20" Fill="#aa000000"/>
            <Ellipse Canvas.Top="30" Canvas.Left="0" Width="20" Height="20" Fill="#cc000000"/>
            <Ellipse Canvas.Top="10" Canvas.Left="10" Width="20" Height="20" Fill="#ff000000"/>

        </Canvas>
    </Viewbox>
</UserControl>
